// import com.alibaba.druid.sql.ast.SQLName_ptr;
// import com.alibaba.druid.sql.ast.SQLObjectImpl;
// import com.alibaba.druid.sql.visitor.SQLASTVisitor;

#include "SQLAlterTableRenameColumn.h"
#include "../../visitor/SQLASTVisitor.h"
#include "../SQLName.h"

SQLAlterTableRenameColumn::SQLAlterTableRenameColumn()
{
}

// @Override
void SQLAlterTableRenameColumn::accept0(SQLASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(SQLAlterTableRenameColumn)))
  {
    acceptChild(visitor, column);
    acceptChild(visitor, to);
  }
  visitor->endVisit(SharedObject(SQLAlterTableRenameColumn));
}

SQLName_ptr SQLAlterTableRenameColumn::getColumn()
{
  return column;
}

void SQLAlterTableRenameColumn::setColumn(SQLName_ptr column)
{
  if (column != nullptr)
  {
    column->setParent(SharedObject(SQLAlterTableRenameColumn));
  }
  this->column = column;
}

SQLName_ptr SQLAlterTableRenameColumn::getTo()
{
  return to;
}

void SQLAlterTableRenameColumn::setTo(SQLName_ptr to)
{
  if (to != nullptr)
  {
    to->setParent(SharedObject(SQLAlterTableRenameColumn));
  }
  this->to = to;
}
